package com.mycp.mycpcommonlib

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import kotlinx.android.synthetic.main.activity_main2.*
import java.util.ArrayList

class MainActivity2 : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main2)


        // 从相册选择
//        PictureSelector.create(this)
//            .openGallery(PictureMimeType.ofVideo())
//            .imageEngine(GlideImageEngine.createGlideEngine())
//            .maxSelectNum(1)
//            .maxVideoSelectNum(1)
//            .forResult(object : OnResultCallbackListener<LocalMedia?> {
//
//                override fun onCancel() {
//                    // onCancel Callback
//                }
//
//                override fun onResult(result: MutableList<LocalMedia?>?) {
//                    val pathList: MutableList<String> = ArrayList()
//
//                    video_player.topContainer.visibility = View.GONE
//                    video_player.startButton.visibility = View.GONE
//                    video_player.posterImageView.isEnabled = false
//                    video_player.setFollowFrame(true)
//                    video_player!!.setUp(result?.get(0)?.realPath, "")
//                    video_player!!.startButton.visibility = View.VISIBLE
//                }
//            })

    }
}